import 'package:flutter/material.dart';
import 'package:hkzf_flutter/pages/profile/functionButton/function_button_item.dart';
import 'package:hkzf_flutter/widgets/common_image.dart';
// 功能按钮面板
class FunctionButtonPanel extends StatelessWidget {
  const FunctionButtonPanel({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Wrap(
        spacing: 5.0,
        runSpacing: 5.0,
        children: functionButtonItemList.map((item)=>GestureDetector(
          onTap: ()=>{
            if(item.onTaoHandle!=null){
              item.onTaoHandle!(context)
            }
          },
          child: Container(
            width: (MediaQuery.of(context).size.width - 10.0) / 3,
            // color: Colors.amber,
            padding: const EdgeInsets.only(top: 15.0),
            child: Column(
              children: [
                CommonImage(src: item.imageUri,width: 45.0,),
                const Padding(padding: EdgeInsets.only(top: 5.0)),
                Text(item.title ?? ''),
              ],
            ),
          ),
        )).toList(),
      ),
    );
  }
}